package com.ruige.account.controller;


import com.ruige.account.entity.Result;
import com.ruige.account.entity.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserInfoController {


//    @RequestMapping("/getUsername")
//    public Result findAll(HttpServletRequest request) {
//        Map<String, String> userInfo = tokenDecode.getUserInfo(request);
//        System.out.println("userInfo = " + userInfo);
//        String nikeName = tokenDecode.getUserInfo(request).get("name");
//        if (nikeName != null) {
//            return new Result(true, StatusCode.OK, "查询成功!", nikeName);
//        } else {
//            return new Result(false, StatusCode.ERROR, "失败!");
//        }
//    }


}
